package com.easyjop.Controller;

import com.easyjop.annotation.GlobalInterceptor;

import com.easyjop.entity.query.QuestionBankQuery;
import com.easyjop.entity.vo.ResponseVO;
import com.easyjop.service.QuestionBankService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/bankList")
public class QuestionBankController extends ABaseController{
    @Resource
    private QuestionBankService questionBankService;
    @RequestMapping("/loadAllBank4Select")
    @GlobalInterceptor
    public ResponseVO loadAllCategory(Integer type) {
        return getSuccessResponseVO(questionBankService.loadAllCategoryByType(type));
    }
    @RequestMapping("/loadDataList")
    @GlobalInterceptor
    public ResponseVO loadAllCategory(QuestionBankQuery query) {
        return getSuccessResponseVO(questionBankService.findCountByParam(query));
    }
}
